package cn.HuanG.org.domain;

import cn.HuanG.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 员工表实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Product extends BaseDomain {
   private Long id;
   private String name;
   private String resources;
   private BigDecimal saleprice;
   private Date offsaletime = new Date();
   private Date onsaletime=new Date();
   private Long state;
   private String costprice;
   private Date createtime=new Date();
   private Long salecount;

   private ProductDetail detail = new ProductDetail();

   @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
   public Date getOffsaletime() {
      return offsaletime;
   }

   @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
   public Date getOnsaletime() {
      return onsaletime;
   }

   @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
   public Date getCreatetime() {
      return createtime;
   }
}
